Skip to main content
PATCH
/
api
/
customers
/
{id}
Update Customer
curl --request PATCH \
  --url https://api.rapidly.tech/api/customers/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {},
  "email": "customer@example.com",
  "name": "John Doe",
  "billing_address": {
    "country": "AD",
    "line1": "<string>",
    "line2": "<string>",
    "postal_code": "<string>",
    "city": "<string>",
    "state": "<string>"
  },
  "external_id": "usr_1337",
  "type": "team"
}
'
{
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "modified_at": "2023-11-07T05:31:56Z",
  "metadata": {},
  "external_id": "usr_1337",
  "email": "<string>",
  "email_verified": true,
  "name": "John Doe",
  "billing_address": {
    "country": "AD",
    "line1": "<string>",
    "line2": "<string>",
    "postal_code": "<string>",
    "city": "<string>",
    "state": "<string>"
  },
  "workspace_id": "<string>",
  "deleted_at": "2023-11-07T05:31:56Z",
  "avatar_url": "<string>",
  "type": "individual",
  "members": [
    {
      "id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "modified_at": "2023-11-07T05:31:56Z",
      "customer_id": "<string>",
      "email": "<string>",
      "name": "Jane Doe",
      "external_id": "usr_1337",
      "role": "owner"
    }
  ]
}

Authorizations

Authorization
string
header
required

Create an Workspace Access Token in your workspace's settings page.

Path Parameters

id
string<uuid4>
required

The customer ID.

Body

application/json
metadata
Metadata · object

Custom key-value attributes.

Keys: string, max 40 chars. Values: string (max 500 chars), integer, float, or boolean. Limit: 50 pairs.

email
string<email> | null

The email address of the customer. This must be unique within the workspace.

Example:

"customer@example.com"

name
string | null

The name of the customer.

Maximum string length: 256
Example:

"John Doe"

billing_address
AddressInput · object
external_id
string | null

The ID of the customer in your system. This must be unique within the workspace. Once set, it can't be updated.

Example:

"usr_1337"

type
enum<string> | null

The customer type. Can only be upgraded from 'individual' to 'team', never downgraded.

Available options:
individual,
team
Example:

"team"

Response

Customer updated.

A customer in an workspace with their members loaded.

id
string<uuid4>
required

The ID of the customer.

Example:

"992fae2a-2a17-4b7a-8d9e-e287cf90131b"

created_at
string<date-time>
required

Creation timestamp of the object.

modified_at
string<date-time> | null
required

Last modification timestamp of the object.

metadata
object
required
external_id
string | null
required

The ID of the customer in your system. This must be unique within the workspace. Once set, it can't be updated.

Example:

"usr_1337"

email
string
required

The email address of the customer. This must be unique within the workspace.

Example:

"customer@example.com"

email_verified
boolean
required

Whether the customer email address is verified. The address is automatically verified when the customer accesses the customer portal using their email address.

Example:

true

name
string | null
required

The name of the customer.

Example:

"John Doe"

billing_address
Address · object
required

A postal address with optional subdivision (state/province) validation.

workspace_id
string<uuid4>
required

The ID of the workspace owning the customer.

Example:

"1dbfc517-0bbf-4301-9ba8-555ca42b9737"

deleted_at
string<date-time> | null
required

Timestamp for when the customer was soft deleted.

avatar_url
string
required
Example:

"https://www.gravatar.com/avatar/xxx?d=404"

type
enum<string> | null

The type of customer: 'individual' for single users, 'team' for customers with multiple members. Legacy customers may have NULL type which is treated as 'individual'.

Available options:
individual,
team
Example:

"individual"

members
Member · object[]

List of members belonging to this customer.