POST /chains

This endpoint allows you to create new chain on the Factom blockchain.

post
Create chain

https://api.de-facto.pro/v1/chains
external_ids & content are required parameters to create new chain.
Request
Response
Headers
X-Api-Key
required
string
Authentication token to access the API. Keep it in secret.
Form Data Parameters
external_ids
required
array
One or many external ids identifying new chain. Should be sent as array of strings.
content
required
string
The content of the first entry of new chain.
200: OK
Chain object returned on success
{
"result": {
"chain_id": "12a260f886ce78751cde9882d6897d6a04a847c56ef488ef9f14f15a25589e5f",
"content": "Test content",
"external_ids": [
"De Facto API",
"Test chain #47"
],
"links": {
"entry": "entries/948e1d1deaade388b361f8b81d7f042152560739cf34e5bc558f63a9693ec296"
}
}
}
400: Bad Request
Example of error
{
"status": false,
"code": 400,
"error": "{\"content\":[\"You need to specify both 'content' & 'external_ids[]'\"]}"
}

The first entry of the chain is automatically created when you create chain. It contains chain's content & external_ids. Link to this entry returned in {"links":{"entry"}}.