# Organizations

## GET /organizations/

>

```json
{"openapi":"3.0.1","info":{"title":"Relabase Public API","version":"v1"},"servers":[{"url":"api.rekap.com/relabase/api/v1/public"}],"security":[{"Bearer":[]},{"Token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Authenticate using `Bearer <jwt>` format for internal endpoints","name":"Authorization","in":"header"},"Token":{"type":"apiKey","description":"Authenticate using `Token <key>` format","name":"Authorization","in":"header"}},"schemas":{"OrganizationV2WithLastContact":{"required":["name","type"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"name":{"title":"Name","maxLength":255,"minLength":1,"type":"string"},"type":{"title":"Type","maxLength":100,"minLength":1,"type":"string"},"domains":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/OrganizationDomain"}},"websites":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/OrganizationWebsite"}},"industries":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/OrganizationIndustry"}},"locations":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/OrganizationLocation"}},"archived":{"title":"Archived","type":"string","format":"date-time","nullable":true,"readOnly":true},"created":{"title":"Created","type":"string","format":"date-time","readOnly":true},"modified":{"title":"Modified","type":"string","format":"date-time","readOnly":true},"last_contact":{"title":"Last contact","type":"string","format":"date-time","readOnly":true},"relationship_type":{"title":"Relationship type","minLength":1,"type":"string","readOnly":true}}},"OrganizationDomain":{"required":["domain"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"domain":{"title":"Domain","maxLength":255,"minLength":1,"type":"string"},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}},"OrganizationWebsite":{"required":["url"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"url":{"title":"Url","maxLength":500,"minLength":1,"type":"string","format":"uri"},"description":{"title":"Description","maxLength":255,"type":"string","nullable":true},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}},"OrganizationIndustry":{"required":["industry"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"industry":{"title":"Industry","maxLength":100,"minLength":1,"type":"string"},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}},"OrganizationLocation":{"required":["location"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"location":{"title":"Location","maxLength":255,"minLength":1,"type":"string"},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}}}},"paths":{"/organizations/":{"get":{"tags":["organizations"],"operationId":"organizations_list","parameters":[{"name":"search","in":"query","description":"A search term.","schema":{"type":"string"}},{"name":"ordering","in":"query","description":"Which field to use when ordering the results.","schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number to retrieve (1-indexed).","schema":{"type":"integer"}},{"name":"page_size","in":"query","description":"Number of results per page. Defaults to the pagination class's page size and respects the configured maximum.","schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"required":["count","results"],"type":"object","properties":{"count":{"type":"integer"},"next":{"type":"string","format":"uri","nullable":true},"previous":{"type":"string","format":"uri","nullable":true},"results":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationV2WithLastContact"}}}}}}}}}}}}
```

## POST /organizations/

>

```json
{"openapi":"3.0.1","info":{"title":"Relabase Public API","version":"v1"},"servers":[{"url":"api.rekap.com/relabase/api/v1/public"}],"security":[{"Bearer":[]},{"Token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Authenticate using `Bearer <jwt>` format for internal endpoints","name":"Authorization","in":"header"},"Token":{"type":"apiKey","description":"Authenticate using `Token <key>` format","name":"Authorization","in":"header"}},"schemas":{"PublicCreateOrganization":{"required":["name","type"],"type":"object","properties":{"name":{"title":"Name","minLength":1,"type":"string"},"type":{"title":"Type","minLength":1,"type":"string"},"domain":{"title":"Domain","type":"string","nullable":true},"website":{"title":"Website","type":"string","nullable":true},"industry":{"title":"Industry","type":"string","nullable":true},"company_size":{"title":"Company size","type":"integer","nullable":true},"location":{"title":"Location","type":"string","nullable":true},"description":{"title":"Description","type":"string","nullable":true}}}}},"paths":{"/organizations/":{"post":{"tags":["organizations"],"operationId":"organizations_create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateOrganization"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCreateOrganization"}}}}}}}}}
```

## GET /organizations/{id}/

>

```json
{"openapi":"3.0.1","info":{"title":"Relabase Public API","version":"v1"},"servers":[{"url":"api.rekap.com/relabase/api/v1/public"}],"security":[{"Bearer":[]},{"Token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Authenticate using `Bearer <jwt>` format for internal endpoints","name":"Authorization","in":"header"},"Token":{"type":"apiKey","description":"Authenticate using `Token <key>` format","name":"Authorization","in":"header"}},"schemas":{"OrganizationV2WithLastContact":{"required":["name","type"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"name":{"title":"Name","maxLength":255,"minLength":1,"type":"string"},"type":{"title":"Type","maxLength":100,"minLength":1,"type":"string"},"domains":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/OrganizationDomain"}},"websites":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/OrganizationWebsite"}},"industries":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/OrganizationIndustry"}},"locations":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/OrganizationLocation"}},"archived":{"title":"Archived","type":"string","format":"date-time","nullable":true,"readOnly":true},"created":{"title":"Created","type":"string","format":"date-time","readOnly":true},"modified":{"title":"Modified","type":"string","format":"date-time","readOnly":true},"last_contact":{"title":"Last contact","type":"string","format":"date-time","readOnly":true},"relationship_type":{"title":"Relationship type","minLength":1,"type":"string","readOnly":true}}},"OrganizationDomain":{"required":["domain"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"domain":{"title":"Domain","maxLength":255,"minLength":1,"type":"string"},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}},"OrganizationWebsite":{"required":["url"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"url":{"title":"Url","maxLength":500,"minLength":1,"type":"string","format":"uri"},"description":{"title":"Description","maxLength":255,"type":"string","nullable":true},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}},"OrganizationIndustry":{"required":["industry"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"industry":{"title":"Industry","maxLength":100,"minLength":1,"type":"string"},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}},"OrganizationLocation":{"required":["location"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"location":{"title":"Location","maxLength":255,"minLength":1,"type":"string"},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}}}},"paths":{"/organizations/{id}/":{"get":{"tags":["organizations"],"operationId":"organizations_read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationV2WithLastContact"}}}}}}}}}
```

## PUT /organizations/{id}/

>

```json
{"openapi":"3.0.1","info":{"title":"Relabase Public API","version":"v1"},"servers":[{"url":"api.rekap.com/relabase/api/v1/public"}],"security":[{"Bearer":[]},{"Token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Authenticate using `Bearer <jwt>` format for internal endpoints","name":"Authorization","in":"header"},"Token":{"type":"apiKey","description":"Authenticate using `Token <key>` format","name":"Authorization","in":"header"}},"schemas":{"OrganizationV2CreateUpdate":{"required":["name","type"],"type":"object","properties":{"name":{"title":"Name","maxLength":255,"minLength":1,"type":"string"},"type":{"title":"Type","maxLength":100,"minLength":1,"type":"string"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationDomain"}},"websites":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationWebsite"}},"industries":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationIndustry"}},"locations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationLocation"}}}},"OrganizationDomain":{"required":["domain"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"domain":{"title":"Domain","maxLength":255,"minLength":1,"type":"string"},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}},"OrganizationWebsite":{"required":["url"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"url":{"title":"Url","maxLength":500,"minLength":1,"type":"string","format":"uri"},"description":{"title":"Description","maxLength":255,"type":"string","nullable":true},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}},"OrganizationIndustry":{"required":["industry"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"industry":{"title":"Industry","maxLength":100,"minLength":1,"type":"string"},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}},"OrganizationLocation":{"required":["location"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"location":{"title":"Location","maxLength":255,"minLength":1,"type":"string"},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}}}},"paths":{"/organizations/{id}/":{"put":{"tags":["organizations"],"operationId":"organizations_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationV2CreateUpdate"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationV2CreateUpdate"}}}}}}}}}
```

## DELETE /organizations/{id}/

>

```json
{"openapi":"3.0.1","info":{"title":"Relabase Public API","version":"v1"},"servers":[{"url":"api.rekap.com/relabase/api/v1/public"}],"security":[{"Bearer":[]},{"Token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Authenticate using `Bearer <jwt>` format for internal endpoints","name":"Authorization","in":"header"},"Token":{"type":"apiKey","description":"Authenticate using `Token <key>` format","name":"Authorization","in":"header"}}},"paths":{"/organizations/{id}/":{"delete":{"tags":["organizations"],"operationId":"organizations_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"","content":{}}}}}}}
```

## PATCH /organizations/{id}/

>

```json
{"openapi":"3.0.1","info":{"title":"Relabase Public API","version":"v1"},"servers":[{"url":"api.rekap.com/relabase/api/v1/public"}],"security":[{"Bearer":[]},{"Token":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","description":"Authenticate using `Bearer <jwt>` format for internal endpoints","name":"Authorization","in":"header"},"Token":{"type":"apiKey","description":"Authenticate using `Token <key>` format","name":"Authorization","in":"header"}},"schemas":{"OrganizationV2CreateUpdate":{"required":["name","type"],"type":"object","properties":{"name":{"title":"Name","maxLength":255,"minLength":1,"type":"string"},"type":{"title":"Type","maxLength":100,"minLength":1,"type":"string"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationDomain"}},"websites":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationWebsite"}},"industries":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationIndustry"}},"locations":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationLocation"}}}},"OrganizationDomain":{"required":["domain"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"domain":{"title":"Domain","maxLength":255,"minLength":1,"type":"string"},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}},"OrganizationWebsite":{"required":["url"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"url":{"title":"Url","maxLength":500,"minLength":1,"type":"string","format":"uri"},"description":{"title":"Description","maxLength":255,"type":"string","nullable":true},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}},"OrganizationIndustry":{"required":["industry"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"industry":{"title":"Industry","maxLength":100,"minLength":1,"type":"string"},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}},"OrganizationLocation":{"required":["location"],"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"location":{"title":"Location","maxLength":255,"minLength":1,"type":"string"},"is_primary":{"title":"Is primary","type":"boolean"},"organization":{"title":"Organization","type":"integer","readOnly":true}}}}},"paths":{"/organizations/{id}/":{"patch":{"tags":["organizations"],"operationId":"organizations_partial_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationV2CreateUpdate"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationV2CreateUpdate"}}}}}}}}}
```
