Skip to main content
The Natural API is REST-based and follows a simplified JSON:API structure. REST requests authenticate with a Natural API key in the Authorization: Bearer header. See Authentication. The same key works across the SDKs, the CLI, and MCP fallback paths. For AI hosts operating Natural for a user, prefer the MCP connector with OAuth.

Requests

To create or update a resource, wrap your fields in data.attributes. No type or id needed; the type is inferred from the endpoint and the ID is assigned by the server.

Creating a resource

Send a POST request with a data object containing attributes:

Updating a resource

To update a resource, send a PATCH request with only the fields you want to change inside attributes. Omitted fields remain unchanged.

Responses

Responses follow the JSON:API specification. A response contains a single resource or a list of resources, and each resource has:
  • type — A string identifying the kind of resource (e.g., "agent", "payment", "transaction")
  • id — A unique prefixed identifier (e.g., agt_019cd179..., pay_019cd179...)
  • attributes — The resource’s data fields
  • relationships (optional) — Links to related resources

Single resource

Responses for a single resource wrap the resource in a data object:

List of resources

List endpoints return an array of resources in data, with pagination metadata in meta:
Use the nextCursor value from meta.pagination to fetch subsequent pages.

Relationships

Relationships connect resources to each other without nesting the full related resource. Each relationship contains a data object with the related resource’s type and id. Relationships appear in responses. In requests, reference related resources by including their ID directly in attributes (e.g., customerPartyId); the one exception is POST /agent-keys, which takes its agent as a request relationship.

To-one relationships

A to-one relationship links to a single related resource:
A null value in data indicates the relationship is absent:

Common relationships

Using relationship IDs

Use the type and id from a relationship to fetch the related resource. For example, if a payment response includes:
You can look up the party using its ID in a subsequent request.

Glossary

  • Resource — An entity in the Natural API, such as a payment, agent, or transaction.
  • Attribute — A piece of information about a resource (e.g., status, amount, createdAt).
  • Relationship — A link from one resource to another, represented by type and id.