Skip to content

Create your API

Attainable APIs are a single configuration file. You define your data structure and provide some optional settings then POST it to your account.

Attainable’s Data Structure syntax is as easy as outlining your data. Data Stores are the top-level, and their fields are indented below them.

The following example will create a complete API with 2 data resources: Users and Addresses.

users:
name: string
birthday: datetime
preferences: { color: string }
addresss:
street: string
city: string
state: string
postal_code: integer

Learn more about Attainable’s Data Structure.

With your configuration file ready, you can simply POST it to Attainable and it will be created in your account. You’ll receive a URL and a default API Key to use as the Authorization Bearer token.

POST to Attainable
curl -XPOST https://attainable.dev/apis -D @./example.yaml \
-H Authorization: Bearer <TOKEN>