API documentation
The Gender object represents a gender associated to a contact. A contact must have a gender before being created.
GET /genders
{
"data": [
{
"id": 1,
"object": "gender",
"name": "Man",
"account": {
"id": 1
},
"created_at": "2019-01-04T23:37:42Z",
"updated_at": "2019-01-04T23:37:42Z"
},
{
"id": 2,
"object": "gender",
"name": "Woman",
"account": {
"id": 1
},
"created_at": "2019-01-04T23:37:42Z",
"updated_at": "2019-01-04T23:37:42Z"
},
{
"id": 3,
"object": "gender",
"name": "Rather not say",
"account": {
"id": 1
},
"created_at": "2019-01-04T23:37:42Z",
"updated_at": "2019-01-04T23:37:42Z"
}
],
"links": {
"first": "https:\/\/app.monicahq.com\/api\/genders?page=1",
"last": "https:\/\/app.monicahq.com\/api\/genders?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https:\/\/app.monicahq.com\/api\/genders",
"per_page": 15,
"to": 3,
"total": 3
}
}
GET /genders/:id
{
"data": {
"id": 1,
"object": "gender",
"name": "Man",
"account": {
"id": 1
},
"created_at": "2019-01-04T23:37:42Z",
"updated_at": "2019-01-04T23:37:42Z"
}
}
POST /genders/
Name | Type | Description |
---|---|---|
name | string | Required. The description of the gender. Max 255 characters. |
{
"name":"man"
}
The API returns a gender object if the gender succeeds.
{
"data": {
"id": 7,
"object": "gender",
"name": "man",
"account": {
"id": 1
},
"created_at": "2019-01-04T23:45:23Z",
"updated_at": "2019-01-04T23:45:23Z"
}
}
PUT /genders/:id
Name | Type | Description |
---|---|---|
name | string | Required. The description of the gender. Max 255 characters. |
{
"name":"woman"
}
{
"data": {
"id": 7,
"object": "gender",
"name": "woman",
"account": {
"id": 1
},
"created_at": "2019-01-04T23:45:23Z",
"updated_at": "2019-01-04T23:46:22Z"
}
}
Warning: deleting a gender is dangerous. You have to make sure that no contacts in your account have this gender before deleting it.
DELETE /genders/:id
The response sends back the id that was just deleted.
{
"deleted": true,
"id": 31
}
Features
Company
Resources
© 2018 — 2024