Skip to content

intents_submit

POST
/intents
curl --request POST \
--url https://example.com/intents \
--header 'Content-Type: application/json' \
--data '{ "payload": { "attrs": { "fields": { "additionalProperty": "example" } }, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "template_id": "example" }, "signature": { "Ed25519": { "pub_key": "example", "signature": "example" } } }'

Submit a signed intent.

The signature is verified and the referenced template must exist before the intent is stored.

Media type application/json

A user-signed message

object
payload
required

The data payload that is being signed.

object
attrs
required

Attribute values that parameterize the template.

object
fields
required
object
key
additional properties
id
required

Unique identifier for this intent.

string format: uuid
template_id
required

ID of the template that defines the rules for fulfilling this intent.

string
signature
required
One of:

Ed25519 signature

object
Ed25519
required

Ed25519 signature

object
pub_key
required

The [PubKey] of the signer

string
signature
required

The [Signature]

string
Example generated
{
"payload": {
"attrs": {
"fields": {
"additionalProperty": "example"
}
},
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"template_id": "example"
},
"signature": {
"Ed25519": {
"pub_key": "example",
"signature": "example"
}
}
}

Intent accepted

Bad request

Media type application/json
object
message
required
string
Example generated
{
"message": "example"
}

Intent already exists

Media type application/json
object
message
required
string
Example generated
{
"message": "example"
}

Internal error

Media type application/json
object
message
required
string
Example generated
{
"message": "example"
}