POST /contacts
Create a contact
POST /contacts#
Create a contact
Authentication#
- bearerAuth (http, bearer)
Path parameters#
None.
Query parameters#
None.
Headers#
None.
Request body#
- Required: Yes
- Content type:
application/json - Schema:
CreateContactRequest
Responses#
| Status | Description | Content type | Schema | Example |
|---|---|---|---|---|
201 |
Contact created | application/json | Contact | — |
400 |
— | — | — | |
401 |
— | — | — |
Examples#
cURL#
curl -X POST "https://api.acme.dev/v1/contacts" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"
JavaScript#
const response = await fetch("https://api.acme.dev/v1/contacts", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
},
});
const data = await response.json();
console.log(data);
TypeScript#
const response = await fetch("https://api.acme.dev/v1/contacts", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
},
});
const data = await response.json();
console.log(data);
// Tip: import generated types from your OpenAPI client SDK.