List custom fields for the space
GET https://:subdomain.cobot.me/api/space/custom_fields
This returns the fields that are set up for the space. Before assigning any custom filds to a membership, they must first be set up for the space.
- Authentication required:
- yes, additionally user must be a space admin
- Scope required
- read_custom_fields
Response:
[{ "label": "Phone", "id": "eee69b28fed5806e62be5ce3cf6a1733" }]
Update custom fields for the space
PUT https://:subdomain.cobot.me/api/space/custom_fields
This updates the custom fields of the space. Any fields not included in the request will be removed from the space and from all members.
Existing fields must be included with their id and label. To add new fields, submit just a label.
- Authentication required:
- yes, additionally user must be a space admin
- Scope required
- write_custom_fields
Example:
PUT https://co-up.cobot.me/api/space/custom_fields
Body:
[
{ "id": "eee69b28fed5806e62be5ce3cf6a1733", "label": "Phone" },
{ "label": "Mobile" }
]
Response:
[
{ "id": "eee69b28fed5806e62be5ce3cf6a1733", "label": "Phone" },
{ "id": "f0120b28fed5806e62be5ce3cf6af087", "label": "Mobile" }
]
List custom fields for one member
GET https://:subdomain.cobot.me/api/memberships/:membership_id/custom_fields
This returns the custom fields for one membership.
- Authentication required:
- yes, additionally user must be a space admin
- Scope required
- read_custom_fields
Example:
GET https://co-up.cobot.me/api/memberships/873d25c0a87507fa5301275/custom_fields
Response:
{
"membership_id": "873d25c0a87507fa5301275",
"fields": [
{
"label": "Phone",
"value": "12345",
"id": "eee69b28fed5806e62be5ce3cf6a1733"
}
]
}
List custom fields for multiple members
GET https://:subdomain.cobot.me/api/custom_fields
This returns the custom fields for all memberships.
- Authentication required:
- yes, additionally user must be a space admin
- Scope required
- read_custom_fields
Example:
GET https://co-up.cobot.me/api/custom_fields
Response:
[
{
"membership_id": "873d25c0a87507fa5301275",
"fields": [
{
"label": "Phone",
"value": "12345",
"id": "eee69b28fed5806e62be5ce3cf6a1733"
}
]
}
]
You can pass an optional membership_ids
query parameter, containing a comma
separated list of membership ids to return custom fields for. Without this
parameter, the custom fields of all currently active memberships is returned.
Update custom fields for a member
PUT https://:subdomain.cobot.me/api/memberships/:membership_id/custom_fields
This updates the custom fields of the member. Only fields present in the request body are updated, other fields are left in place.
- Authentication required:
- yes, additionally user must be a space admin
- Scope required
- write_custom_fields
Example:
PUT https://co-up.cobot.me/api/memberships/873d25c0a87507fa5301275/custom_fields
Body:
[{ "id": "eee69b28fed5806e62be5ce3cf6a1733", "value": "12345" }]
Response:
[
{
"membership_id": "873d25c0a87507fa5301275",
"fields": [
{
"label": "Phone",
"value": "12345",
"id": "eee69b28fed5806e62be5ce3cf6a1733"
}
]
}
]