Create a New Client
Create a new client with optional fields.
This endpoint allows you to create a new client by providing certain optional fields. The request will return the ID of the newly created client.
Example Request:
curl "https://<your-agency>.smartmatchapp.com/api3/clients/" \
-u <token>: \
-X POST \
-F stype=2 \
-F is_submitted=true \
-F is_archived=false \
-F created="2022-06-02T10:00Z" \
-F assigned_users=1 \
-F assigned_users=2
Form Fields:
stype: (Optional) The type of client, represented by an ID.
is_submitted: (Optional) A boolean value indicating whether the client is submitted.
is_archived: (Optional) A boolean value indicating whether the client is archived.
created: The datetime when the client was created. If not provided, the current datetime will be used. Must follow the ISO 8601 format (e.g., `2022-06-02T10:00Z`).
assigned_users: (Optional) One or more agency user IDs to assign to this client. To assign multiple users, repeat the field name with different values. If you pass an empty value all currently assigned users will be unassigned from the client.
Example Success Response:
{
"id": 2
}
This response indicates that a new client has been successfully created with the ID 2.
Base Request:
Method: POST
Authentication: Basic Authentication. Requires a valid <token> passed.
Rate Limits:
30 requests within 5 seconds
Error Responses:
| 400 | Bad Request |
This error occurs if the provided data is invalid. |
| 401 | Unauthorized |
This error occurs when the <token> is missing, invalid, or the API access is disabled. Possible errors: "not authenticated" or "token is disabled" or "Agency API is disabled" |
| 405 | Method Not Allowed |
This error occurs if an HTTP method other than POST is used (e.g., GET or PUT). Possible errors: "wrong method" |
| 429 | Too Many Requests |
This error occurs when the client has sent too many requests in a given amount of time, leading to rate limiting by the server. Possible errors: "too many requests" |
| 500 | Server Error |
Possible errors: "Internal server error" |
Available Fields:
The field ids, labels, types, and available values below are generic samples. Every agency defines its own custom fields, so your agency's own live list appears in its private copy of these API docs.
| Title | Name | Type | |
|---|---|---|---|
| id | Integer Number | ||
| Archived | is_archived | Yes/No | |
| Submitted | is_submitted | Yes/No | |
| Created Date | created | DateTime | |
| Type | stype |
Show Values
|
|
| Assigned To | assigned_users | Staff members are specific to each agency; your agency's own copy of these docs lists them. |