Create a Household Invitation
Request Details
| Item | Value |
| Description | Creates an invitation for an existing household. |
| Method | POST |
| Endpoint | https://[environment]api[client_id].crowdtwist.com/v2/household/[household_id]/invitation?api_key=[api_key]¤t_user=[member_id] |
| Content Type | application/json |
Request
| Field Name | Sample Value | Required | Format | Notes |
| URL PARAMETERS | ||||
| household_id | 10 | Yes | Integer | The id of the household. |
| QUERY STRING PARAMETERS | ||||
| api_key | QWERTYUIOP | Yes | String | |
| current_user | 240835353 | Yes | Integer | The member who is performing this action. This member must be the household owner. (CrowdTwist User ID) |
Request Body
| Field Name | Validation | Format | Notes |
| email_address | ["jack@example.com"] | String (Array) | The email addresses of members to be invited to this household. |
Successful Response
| Field Name | Sample Value | Format | Description |
| email_address | ["jack@example.com"] | String (Array) | Confirmation of the email addresses used to create these household invitations. |
Sample Successful Response
{
"email_address": [
"jennythangaraj@gmail.com"
]
}
Error Responses
| Error Code | Description |
| 404 | Unable to find household. |
| 400 | User must be the household owner to create or rescind invites |
| 400 | A non-positive integer value was provided for current_user. |
| 400 | Missing current_user query parameter. |
| 400 | email_address is required. |
| 400 | Invalid email address provided. |