> For the complete documentation index, see [llms.txt](https://docs.statuspal.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.statuspal.io/platform/api-reference/organization-members.md).

# Organization Members

Organization Members endpoints

## GET /orgs/{organizationId}/members

> List all members

```json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Organization Members","description":"Organization Members endpoints"}],"servers":[{"url":"https://statuspal.io/api/v2"},{"url":"https://statuspal.eu/api/v2"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"parameters":{"OrganizationId":{"name":"organizationId","in":"path","description":"The ID of the organization","required":true,"schema":{"type":"integer"}}},"schemas":{"OrganizationMember":{"type":"object","properties":{"id":{"type":"integer","description":"The member's id.","readOnly":true},"email":{"type":"string","description":"The member's email address.","readOnly":true},"role":{"type":"string","description":"The membership role.\nAvailable roles:\n* `c` - Editor\n* `v` - Viewer\n* `a` - Admin\n* `o` - Owner\n"},"user":{"type":"object","properties":{"id":{"type":"integer","description":"The user's id.","readOnly":true},"last_sign_in_at":{"type":"string","description":"The date and time the user signed in before their current session","format":"date-time","readOnly":true},"current_sign_in_at":{"type":"string","description":"The date and time the user signed in for their current session","format":"date-time","readOnly":true}},"description":"The related User object (if there is one).","readOnly":true},"inserted_at":{"type":"string","description":"Datetime at which the record was inserted","format":"date-time","readOnly":true},"updated_at":{"type":"string","description":"Datetime at which the record was last updated","format":"date-time","readOnly":true}}},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"integer","description":"Unauthorized"}}},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","description":"Forbidden"}}},"NotFoundError":{"type":"object","properties":{"error":{"type":"string","description":"Resource not found!"}}},"ServerError":{"type":"object","properties":{"error":{"type":"string","description":"Internal server error :("}}}},"responses":{"UnauthorizedError":{"description":"Authorization information is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"ForbiddenError":{"description":"You lack the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"NotFoundError":{"description":"A resource with the provided ID was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"ServerError":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}},"paths":{"/orgs/{organizationId}/members":{"get":{"tags":["Organization Members"],"summary":"List all members","operationId":"getMembers","parameters":[{"$ref":"#/components/parameters/OrganizationId"},{"name":"before","in":"query","description":"Used as a cursor for pagination.","schema":{"type":"string"}},{"name":"after","in":"query","description":"Used as a cursor for pagination.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Set the number of subscriptions to return in the response.\nThis defaults to 20 items, and can be a maximum of 100.\n","schema":{"type":"integer"}},{"name":"email","in":"query","description":"Filter the members by email.","schema":{"type":"string"}}],"responses":{"200":{"description":"The list of members","content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationMember"}},"links":{"type":"object","properties":{"next":{"type":"string","description":"Link for the next page."},"prev":{"type":"string","description":"Link for the previous page."}}},"meta":{"type":"object","properties":{"total_count":{"type":"integer","description":"Shows the total amount of members."}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```

## POST /orgs/{organizationId}/members

> Adds a new membership

```json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Organization Members","description":"Organization Members endpoints"}],"servers":[{"url":"https://statuspal.io/api/v2"},{"url":"https://statuspal.eu/api/v2"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"parameters":{"OrganizationId":{"name":"organizationId","in":"path","description":"The ID of the organization","required":true,"schema":{"type":"integer"}}},"schemas":{"OrganizationMemberObj":{"type":"object","properties":{"member":{"$ref":"#/components/schemas/OrganizationMember"}}},"OrganizationMember":{"type":"object","properties":{"id":{"type":"integer","description":"The member's id.","readOnly":true},"email":{"type":"string","description":"The member's email address.","readOnly":true},"role":{"type":"string","description":"The membership role.\nAvailable roles:\n* `c` - Editor\n* `v` - Viewer\n* `a` - Admin\n* `o` - Owner\n"},"user":{"type":"object","properties":{"id":{"type":"integer","description":"The user's id.","readOnly":true},"last_sign_in_at":{"type":"string","description":"The date and time the user signed in before their current session","format":"date-time","readOnly":true},"current_sign_in_at":{"type":"string","description":"The date and time the user signed in for their current session","format":"date-time","readOnly":true}},"description":"The related User object (if there is one).","readOnly":true},"inserted_at":{"type":"string","description":"Datetime at which the record was inserted","format":"date-time","readOnly":true},"updated_at":{"type":"string","description":"Datetime at which the record was last updated","format":"date-time","readOnly":true}}},"BadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Bad request!"}}},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"integer","description":"Unauthorized"}}},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","description":"Forbidden"}}},"ValidationError":{"type":"object","properties":{"errors":{"type":"object","description":"A dictionary where each key contains the name of a field with a validation error and the value an array with the validation errors"}}},"ServerError":{"type":"object","properties":{"error":{"type":"string","description":"Internal server error :("}}}},"responses":{"BadRequestError":{"description":"Bad request error. Probably JSON syntax is wrong, check with jsonlint.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"UnauthorizedError":{"description":"Authorization information is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"ForbiddenError":{"description":"You lack the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"ValidationError":{"description":"There was a validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"ServerError":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}},"paths":{"/orgs/{organizationId}/members":{"post":{"tags":["Organization Members"],"summary":"Adds a new membership","operationId":"addMember","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"description":"The membership","content":{"application/json":{"schema":{"type":"object","properties":{"member":{"type":"object","properties":{"email":{"type":"string","description":"The member's email address."},"role":{"type":"string","description":"The membership role.\nAvailable roles:\n* `c` - Editor\n* `v` - Viewer\n* `a` - Admin\n* `o` - Owner\n"}}}}}}},"required":true},"responses":{"200":{"description":"The membership was created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMemberObj"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"422":{"$ref":"#/components/responses/ValidationError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```

## PUT /orgs/{organizationId}/members/{memberId}

> Update the membership

```json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Organization Members","description":"Organization Members endpoints"}],"servers":[{"url":"https://statuspal.io/api/v2"},{"url":"https://statuspal.eu/api/v2"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"parameters":{"OrganizationId":{"name":"organizationId","in":"path","description":"The ID of the organization","required":true,"schema":{"type":"integer"}},"MemberId":{"name":"memberId","in":"path","description":"The ID of a membership","required":true,"schema":{"type":"integer"}}},"schemas":{"OrganizationMemberObj":{"type":"object","properties":{"member":{"$ref":"#/components/schemas/OrganizationMember"}}},"OrganizationMember":{"type":"object","properties":{"id":{"type":"integer","description":"The member's id.","readOnly":true},"email":{"type":"string","description":"The member's email address.","readOnly":true},"role":{"type":"string","description":"The membership role.\nAvailable roles:\n* `c` - Editor\n* `v` - Viewer\n* `a` - Admin\n* `o` - Owner\n"},"user":{"type":"object","properties":{"id":{"type":"integer","description":"The user's id.","readOnly":true},"last_sign_in_at":{"type":"string","description":"The date and time the user signed in before their current session","format":"date-time","readOnly":true},"current_sign_in_at":{"type":"string","description":"The date and time the user signed in for their current session","format":"date-time","readOnly":true}},"description":"The related User object (if there is one).","readOnly":true},"inserted_at":{"type":"string","description":"Datetime at which the record was inserted","format":"date-time","readOnly":true},"updated_at":{"type":"string","description":"Datetime at which the record was last updated","format":"date-time","readOnly":true}}},"BadRequestError":{"type":"object","properties":{"error":{"type":"string","description":"Bad request!"}}},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"integer","description":"Unauthorized"}}},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","description":"Forbidden"}}},"NotFoundError":{"type":"object","properties":{"error":{"type":"string","description":"Resource not found!"}}},"ValidationError":{"type":"object","properties":{"errors":{"type":"object","description":"A dictionary where each key contains the name of a field with a validation error and the value an array with the validation errors"}}},"ServerError":{"type":"object","properties":{"error":{"type":"string","description":"Internal server error :("}}}},"responses":{"BadRequestError":{"description":"Bad request error. Probably JSON syntax is wrong, check with jsonlint.com.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"UnauthorizedError":{"description":"Authorization information is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"ForbiddenError":{"description":"You lack the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"NotFoundError":{"description":"A resource with the provided ID was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"ValidationError":{"description":"There was a validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"ServerError":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}}},"paths":{"/orgs/{organizationId}/members/{memberId}":{"put":{"tags":["Organization Members"],"summary":"Update the membership","operationId":"updateMember","parameters":[{"$ref":"#/components/parameters/OrganizationId"},{"$ref":"#/components/parameters/MemberId"}],"requestBody":{"description":"The membership","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMemberObj"}}},"required":true},"responses":{"200":{"description":"The membership was updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationMemberObj"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"422":{"$ref":"#/components/responses/ValidationError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```

## DELETE /orgs/{organizationId}/members/{memberId}

> Deletes the membership

```json
{"openapi":"3.0.1","info":{"title":"StatusPal API Reference","version":"2.0.0"},"tags":[{"name":"Organization Members","description":"Organization Members endpoints"}],"servers":[{"url":"https://statuspal.io/api/v2"},{"url":"https://statuspal.eu/api/v2"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"parameters":{"OrganizationId":{"name":"organizationId","in":"path","description":"The ID of the organization","required":true,"schema":{"type":"integer"}},"MemberId":{"name":"memberId","in":"path","description":"The ID of a membership","required":true,"schema":{"type":"integer"}}},"responses":{"UnauthorizedError":{"description":"Authorization information is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnauthorizedError"}}}},"ForbiddenError":{"description":"You lack the necessary permissions to access this resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForbiddenError"}}}},"NotFoundError":{"description":"A resource with the provided ID was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFoundError"}}}},"ServerError":{"description":"Unexpected error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerError"}}}}},"schemas":{"UnauthorizedError":{"type":"object","properties":{"error":{"type":"integer","description":"Unauthorized"}}},"ForbiddenError":{"type":"object","properties":{"error":{"type":"string","description":"Forbidden"}}},"NotFoundError":{"type":"object","properties":{"error":{"type":"string","description":"Resource not found!"}}},"ServerError":{"type":"object","properties":{"error":{"type":"string","description":"Internal server error :("}}}}},"paths":{"/orgs/{organizationId}/members/{memberId}":{"delete":{"tags":["Organization Members"],"summary":"Deletes the membership","operationId":"deleteMember","parameters":[{"$ref":"#/components/parameters/OrganizationId"},{"$ref":"#/components/parameters/MemberId"}],"responses":{"204":{"description":"Member deleted successfully","content":{}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"404":{"$ref":"#/components/responses/NotFoundError"},"500":{"$ref":"#/components/responses/ServerError"}}}}}}
```
