Skip to content
Product
Solutions
Resources
Pricing
Customers and sales

Create a customer

POST/api/v1/customerscustomer:create

Customers, leads and deals accept creates and updates. There are no delete endpoints for any of them. Base URL: https://app.terania.ai/api/v1. For request rules see conventions.

Security

API key, as a Bearer header

Send Authorization: Bearer <key>. The word Bearer is not case-sensitive. A key in the query string (key, api_key or token) is refused with 401 before anything else happens.

Example: Authorization: Bearer $TERANIA_KEY

Accepted permissioncustomer:create

Without it the answer is 403 write_forbidden. A scope is a filter, not a grant: it can only narrow what the person who made the key can do.

Body

Body parameters, JSON
kindstring

person or organisation.

displayNamestring
emailstringoptional
  • Not accepted: any other field. Addresses, tags, owners and custom fields cannot be written over the API. An unknown field answers 400: "Unknown field: name."
  • The body is JSON, Content-Type: application/json, at most 16,384 bytes.

Headers

Header parameters
Authorizationstringrequired

Bearer and your key. Keys begin with qk_.

Content-Typestring

application/json.

Idempotency-Keystringnot supported here

This endpoint refuses it with 400 invalid_request: "Idempotency-Key is not supported on this endpoint yet." It works on POST /cases, POST /tasks and POST /missions.

Returns

Answer
201 Createdobject

Returns { id, displayName }.

idstring

An opaque string. Treat it as such.

displayNamestring
Response headers

On every API v1 response, success or error.

API-Version
RateLimit-Limit

The limit for the bucket that is closest to running out.

RateLimit-Remaining

Requests left in the window.

RateLimit-Reset

Seconds until the window resets.

Answers

Statuscodeerror sentence
201noneThe new customer: { id, displayName }.
400bad_requestThat request body could not be read.
400invalid_request"Unknown field: name." Or "Send the changes as a JSON object." Or "Idempotency-Key is not supported on this endpoint yet."
401unauthorizedThis request needs a valid API key.
403write_forbiddenThis API key is not allowed to make this change.
429rate_limitedToo many requests. Try again shortly. Wait for Retry-After seconds.

Every error is JSON with error, code and, when available, requestId. Branch on code, not on the sentence.

Try the documented answers

Fill the fields and the request on the right rewrites itself. Nothing is sent: the answer shown is the one this page documents for what you chose.

Sample
What to send

Next: webhooks

Terania sends 39 event kinds to your https address, signed with HMAC-SHA256, IDs only.

Esc
Start typing to search pages, docs and posts.

↑↓ NavigateEnter OpenEsc Close