Create a contact
Add somebody to your books from your own system. A form on your website, a lead out of your CRM, a customer you're migrating across.
/api/public/v1/contacts Headers
| Header | Value | Why |
|---|---|---|
| X-AUTH-TOKEN | obl_live_... | Your API key. Every call needs one. |
| Content-Type | application/json | This call sends a body. |
| Idempotency-Key | a value unique to this request | So a retry whose first answer got lost cannot create a second record. |
What you send
Every field here is one you can set. The rest are ours to fill in.
| Field | Type |
|---|---|
| firstNamemax 100 | string |
| middleNamemax 100 | string |
| lastNamemax 100 | string |
| nickNamemax 100 | string |
| salutationmax 50 | string |
| titlemax 100 | string |
| jobTitlemax 150 | string |
| departmentmax 100 | string |
| emailmax 180 | string |
| phoneOffice | string |
| phoneMobile | string |
| phoneHome | string |
| phoneOther | string |
| fax | string |
| assistantName | string |
| assistantPhone | string |
| description | string |
| birthDate | string |
| gender | string |
| companyId | string |
| isCustomer | boolean |
| isSupplier | boolean |
| isPrimary | boolean |
| doNotCall | boolean |
| lifecycleStage | string |
| leadSource | string |
| reportsToId | string |
| tags | array |
The call
curl -X POST https://app.obraledger.com/api/public/v1/contacts \
-H "X-AUTH-TOKEN: obl_live_..." \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{ ... }' Want to fill this in and run it? Open it in the playground.
What comes back
One contact.
Generated from the contract, so it is every field and nothing invented. The values are type names rather than a specimen record - we won't put made-up data on a page.
{
"id": "string",
"createdAt": "string",
"updatedAt": "string",
"firstName": "string",
"middleName": "string",
"lastName": "string",
"nickName": "string",
"salutation": "string",
"title": "string",
"jobTitle": "string",
"department": "string",
"email": "string",
"phoneOffice": "string",
"phoneMobile": "string",
"phoneHome": "string",
"phoneOther": "string",
"fax": "string",
"assistantName": "string",
"assistantPhone": "string",
"description": "string",
"birthDate": "string",
"gender": "string",
"companyId": "string",
"isCustomer": false,
"isSupplier": false,
"isPrimary": false,
"doNotCall": false,
"lifecycleStage": "string",
"leadSource": "string",
"reportsToId": "string",
"tags": []
} When it fails
Match on the type in the body, not on
the status. A 403 covers both "this key can't do that" and "this record won't allow it", and the
number alone can't tell you which.
- 400 The request could not be read as a request.
- 401 Authentication failed — the `X-AUTH-TOKEN` header is missing, malformed, revoked, or belongs to a different company. Not retryable: the same token will fail identically.
- 403 Authenticated, but not allowed to do this.
- 422 The request was understood and its content was rejected.
- 429 Rate limit exceeded for this API key. `Retry-After` says how many seconds to wait; `X-RateLimit-Limit` and `X-RateLimit-Remaining` report the budget on every response, not just this one.
The rest of contacts
- get List contacts /api/public/v1/contacts
- get Get one contact /api/public/v1/contacts/{id}
- patch Update a contact /api/public/v1/contacts/{id}
- delete Delete a contact /api/public/v1/contacts/{id}
Base URL https://app.obraledger.com. This page is
generated from the contract the product publishes.
Building something and stuck? Tell us - we'd rather hear it than have you guess.