Difference between revisions of "Add New Contact Info Email"
Ashley DeBon (talk | contribs) (Created page with "== Add Contact Info Email == === Base URL === https://apimobile.callproof.com === Endpoint === /api/contacts/{id}/info-email === Purpose === Adds an additional company-leve...") |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| Line 41: | Line 41: | ||
| email || string || Yes || Email address to add (must be a valid email format and must not already exist as a contact info email) | | email || string || Yes || Email address to add (must be a valid email format and must not already exist as a contact info email) | ||
|} | |} | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | <pre> | ||
| + | curl --location --request POST 'https://apimobile.callproof.com/api/contacts/{id}/info-email' \ | ||
| + | --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ | ||
| + | --form 'email=YOUR_EMAIL_ADDRESS' | ||
| + | </pre> | ||
| + | === cURL Example for iOS === | ||
| + | <pre> | ||
| + | curl --location --request POST 'https://apimobile.callproof.com/api/contacts/{id}/info-email' \ | ||
| + | --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ | ||
| + | --form 'email=YOUR_EMAIL_ADDRESS' | ||
| + | </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 11:02, 17 July 2026
Contents
Add Contact Info Email
Base URL
https://apimobile.callproof.com
Endpoint
/api/contacts/{id}/info-email
Purpose
Adds an additional company-level email address to a contact. The email must be unique across existing contact info emails.
HTTP Method
POST
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | integer | Yes | Unique identifier of the contact that will receive the email |
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | Email address to add (must be a valid email format and must not already exist as a contact info email) |
cURL Example for Android
curl --location --request POST 'https://apimobile.callproof.com/api/contacts/{id}/info-email' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--form 'email=YOUR_EMAIL_ADDRESS'
cURL Example for iOS
curl --location --request POST 'https://apimobile.callproof.com/api/contacts/{id}/info-email' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--form 'email=YOUR_EMAIL_ADDRESS'
Successful Response (200)
Indicates that the email was added successfully.
| Field | Type | Description |
|---|---|---|
| clientStatusCode | integer | Status indicator for the client (for example, 200) |
| user_id | integer | Identifier of the authenticated user |
| company_id | integer | Identifier of the authenticated user’s company |
| message | string | Confirmation message (for example, "Email successfully added.") |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation failed – response body uses clientStatusCode 401 with the first validation error message
|
| 400 | Bad Request – the email could not be added |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- Validation (HTTP 200, clientStatusCode 401) – Missing
email, invalid email format, or email already exists. - 400 – Contact not found, or another error while adding the email (for example, "Error While Adding Contact Info Email").
- 401 – Authentication failed or the access token is missing/expired.