ClientSphereDocs
API reference/Accounts

Create account

Creates an account and returns the created record with its generated id. Responds 201 on success, or 400 if the body fails validation.

POST
/accounts

Authorization

AuthorizationRequiredBearer <token>

API key as Bearer token: Authorization: Bearer sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

X-API-Key<token>

API key via header: X-API-Key: sk_live_.... Use sk_live_ prefixed keys for production data and sk_test_ prefixed keys for sandbox/test data.

In: header

Request Body

application/jsonRequired
nameRequiredstring
websitestring
industrystring
sizestring
Value in: "small" | "medium" | "large" | "enterprise"
phonestring
addressstring
extraInformationstring
statusstring
Default: "active"Value in: "active" | "inactive" | "prospect" | "customer" | "churned"
tagsarray<string>
curl -X POST "https://clientsphere.io/api/v1/accounts" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "website": "https://acme.com",
    "industry": "Technology",
    "size": "small",
    "phone": "string",
    "address": "string",
    "extraInformation": "VIP customer; renewal in Q3.",
    "status": "active",
    "tags": [
      "enterprise",
      "priority"
    ]
  }'

Created account

{
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "companyId": "8bb73d03-06b4-47c7-80c7-59301f770eda",
    "name": "string",
    "website": "string",
    "industry": "string",
    "size": "small",
    "phone": "string",
    "address": "string",
    "extraInformation": "string",
    "status": "active",
    "assignedTo": 0,
    "ownerId": 0,
    "tags": [
      "string"
    ],
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}