# Relationships

## GET /relationships/

>

```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":{"PublicRelationship":{"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"from_content_type":{"title":"From content type","type":"integer","readOnly":true},"from_object_id":{"title":"From object id","type":"integer","readOnly":true},"to_content_type":{"title":"To content type","type":"integer","readOnly":true},"to_object_id":{"title":"To object id","type":"integer","readOnly":true},"from_entity":{"title":"From entity","type":"object","properties":{},"nullable":true,"readOnly":true},"to_entity":{"title":"To entity","type":"object","properties":{},"nullable":true,"readOnly":true},"aspect_type":{"title":"Aspect type","type":"string","nullable":true,"readOnly":true,"enum":["mentor","vendor","contact","manager","customer","prospect","investor","advisor","self"]},"strength":{"title":"Strength","type":"number","nullable":true,"readOnly":true},"start_date":{"title":"Start date","type":"string","format":"date","readOnly":true},"end_date":{"title":"End date","type":"string","format":"date","nullable":true,"readOnly":true},"meta":{"title":"Meta","type":"object","properties":{},"readOnly":true},"is_private":{"title":"Is private","type":"boolean","readOnly":true},"created":{"title":"Created","type":"string","format":"date-time","readOnly":true},"modified":{"title":"Modified","type":"string","format":"date-time","readOnly":true},"role_contexts":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/PublicRelationshipRoleContext"}},"current_state":{"title":"Current state","type":"object","properties":{},"nullable":true,"readOnly":true}}},"PublicRelationshipRoleContext":{"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"relationship":{"title":"Relationship","type":"integer","readOnly":true},"relationship_uuid":{"title":"Relationship uuid","type":"string","format":"uuid","readOnly":true},"relationship_role":{"title":"Relationship role","minLength":1,"type":"string","readOnly":true},"description":{"title":"Description","minLength":1,"type":"string","description":"Description of the role in this relationship context","nullable":true,"readOnly":true},"created":{"title":"Created","type":"string","format":"date-time","readOnly":true},"modified":{"title":"Modified","type":"string","format":"date-time","readOnly":true}}}}},"paths":{"/relationships/":{"get":{"tags":["relationships"],"operationId":"relationships_list","parameters":[{"name":"ordering","in":"query","description":"Which field to use when ordering the results.","schema":{"type":"string"}},{"name":"aspect_type","in":"query","description":"aspect_type","schema":{"type":"string","enum":["mentor","vendor","contact","manager","customer","prospect","investor","advisor","self"]}},{"name":"is_private","in":"query","description":"is_private","schema":{"type":"string"}},{"name":"from_content_type","in":"query","description":"from_content_type","schema":{"type":"string"}},{"name":"to_content_type","in":"query","description":"to_content_type","schema":{"type":"string"}},{"name":"from_object_id","in":"query","description":"from_object_id","schema":{"type":"string"}},{"name":"to_object_id","in":"query","description":"to_object_id","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/PublicRelationship"}}}}}}}}}}}}
```

## POST /relationships/

>

```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":{"PublicRelationshipCreate":{"required":["entity_type","from_id","start_date","to_id"],"type":"object","properties":{"entity_type":{"title":"Entity type","type":"string","enum":["person","organization","role"]},"from_id":{"title":"From id","type":"integer"},"to_id":{"title":"To id","type":"integer"},"start_date":{"title":"Start date","type":"string","format":"date"},"end_date":{"title":"End date","type":"string","format":"date","nullable":true},"aspect_type":{"title":"Aspect type","type":"string","nullable":true,"enum":["mentor","vendor","contact","manager","customer","prospect","investor","advisor","self"]},"strength":{"title":"Strength","type":"number","nullable":true},"is_private":{"title":"Is private","type":"boolean","default":false},"meta":{"title":"Meta","type":"object","additionalProperties":{"type":"string","nullable":true}}}}}},"paths":{"/relationships/":{"post":{"tags":["relationships"],"operationId":"relationships_create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRelationshipCreate"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRelationshipCreate"}}}}}}}}}
```

## GET /relationships/{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":{"PublicRelationship":{"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"from_content_type":{"title":"From content type","type":"integer","readOnly":true},"from_object_id":{"title":"From object id","type":"integer","readOnly":true},"to_content_type":{"title":"To content type","type":"integer","readOnly":true},"to_object_id":{"title":"To object id","type":"integer","readOnly":true},"from_entity":{"title":"From entity","type":"object","properties":{},"nullable":true,"readOnly":true},"to_entity":{"title":"To entity","type":"object","properties":{},"nullable":true,"readOnly":true},"aspect_type":{"title":"Aspect type","type":"string","nullable":true,"readOnly":true,"enum":["mentor","vendor","contact","manager","customer","prospect","investor","advisor","self"]},"strength":{"title":"Strength","type":"number","nullable":true,"readOnly":true},"start_date":{"title":"Start date","type":"string","format":"date","readOnly":true},"end_date":{"title":"End date","type":"string","format":"date","nullable":true,"readOnly":true},"meta":{"title":"Meta","type":"object","properties":{},"readOnly":true},"is_private":{"title":"Is private","type":"boolean","readOnly":true},"created":{"title":"Created","type":"string","format":"date-time","readOnly":true},"modified":{"title":"Modified","type":"string","format":"date-time","readOnly":true},"role_contexts":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/PublicRelationshipRoleContext"}},"current_state":{"title":"Current state","type":"object","properties":{},"nullable":true,"readOnly":true}}},"PublicRelationshipRoleContext":{"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"relationship":{"title":"Relationship","type":"integer","readOnly":true},"relationship_uuid":{"title":"Relationship uuid","type":"string","format":"uuid","readOnly":true},"relationship_role":{"title":"Relationship role","minLength":1,"type":"string","readOnly":true},"description":{"title":"Description","minLength":1,"type":"string","description":"Description of the role in this relationship context","nullable":true,"readOnly":true},"created":{"title":"Created","type":"string","format":"date-time","readOnly":true},"modified":{"title":"Modified","type":"string","format":"date-time","readOnly":true}}}}},"paths":{"/relationships/{id}/":{"get":{"tags":["relationships"],"operationId":"relationships_read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRelationship"}}}}}}}}}
```

## PUT /relationships/{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":{"PublicRelationshipUpdate":{"type":"object","properties":{"start_date":{"title":"Start date","type":"string","format":"date"},"end_date":{"title":"End date","type":"string","format":"date","nullable":true},"aspect_type":{"title":"Aspect type","type":"string","nullable":true,"enum":["mentor","vendor","contact","manager","customer","prospect","investor","advisor","self"]},"strength":{"title":"Strength","type":"number","nullable":true},"is_private":{"title":"Is private","type":"boolean"},"meta":{"title":"Meta","type":"object","additionalProperties":{"type":"string","nullable":true}}}}}},"paths":{"/relationships/{id}/":{"put":{"tags":["relationships"],"operationId":"relationships_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRelationshipUpdate"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRelationshipUpdate"}}}}}}}}}
```

## DELETE /relationships/{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":{"/relationships/{id}/":{"delete":{"tags":["relationships"],"operationId":"relationships_delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"","content":{}}}}}}}
```

## PATCH /relationships/{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":{"PublicRelationshipUpdate":{"type":"object","properties":{"start_date":{"title":"Start date","type":"string","format":"date"},"end_date":{"title":"End date","type":"string","format":"date","nullable":true},"aspect_type":{"title":"Aspect type","type":"string","nullable":true,"enum":["mentor","vendor","contact","manager","customer","prospect","investor","advisor","self"]},"strength":{"title":"Strength","type":"number","nullable":true},"is_private":{"title":"Is private","type":"boolean"},"meta":{"title":"Meta","type":"object","additionalProperties":{"type":"string","nullable":true}}}}}},"paths":{"/relationships/{id}/":{"patch":{"tags":["relationships"],"operationId":"relationships_partial_update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRelationshipUpdate"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicRelationshipUpdate"}}}}}}}}}
```

## GET /relationships/{id}/state-history/

>

```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":{"PublicRelationship":{"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"uuid":{"title":"Uuid","type":"string","format":"uuid","readOnly":true},"from_content_type":{"title":"From content type","type":"integer","readOnly":true},"from_object_id":{"title":"From object id","type":"integer","readOnly":true},"to_content_type":{"title":"To content type","type":"integer","readOnly":true},"to_object_id":{"title":"To object id","type":"integer","readOnly":true},"from_entity":{"title":"From entity","type":"object","properties":{},"nullable":true,"readOnly":true},"to_entity":{"title":"To entity","type":"object","properties":{},"nullable":true,"readOnly":true},"aspect_type":{"title":"Aspect type","type":"string","nullable":true,"readOnly":true,"enum":["mentor","vendor","contact","manager","customer","prospect","investor","advisor","self"]},"strength":{"title":"Strength","type":"number","nullable":true,"readOnly":true},"start_date":{"title":"Start date","type":"string","format":"date","readOnly":true},"end_date":{"title":"End date","type":"string","format":"date","nullable":true,"readOnly":true},"meta":{"title":"Meta","type":"object","properties":{},"readOnly":true},"is_private":{"title":"Is private","type":"boolean","readOnly":true},"created":{"title":"Created","type":"string","format":"date-time","readOnly":true},"modified":{"title":"Modified","type":"string","format":"date-time","readOnly":true},"role_contexts":{"type":"array","readOnly":true,"items":{"$ref":"#/components/schemas/PublicRelationshipRoleContext"}},"current_state":{"title":"Current state","type":"object","properties":{},"nullable":true,"readOnly":true}}},"PublicRelationshipRoleContext":{"type":"object","properties":{"id":{"title":"ID","type":"integer","readOnly":true},"relationship":{"title":"Relationship","type":"integer","readOnly":true},"relationship_uuid":{"title":"Relationship uuid","type":"string","format":"uuid","readOnly":true},"relationship_role":{"title":"Relationship role","minLength":1,"type":"string","readOnly":true},"description":{"title":"Description","minLength":1,"type":"string","description":"Description of the role in this relationship context","nullable":true,"readOnly":true},"created":{"title":"Created","type":"string","format":"date-time","readOnly":true},"modified":{"title":"Modified","type":"string","format":"date-time","readOnly":true}}}}},"paths":{"/relationships/{id}/state-history/":{"get":{"tags":["relationships"],"operationId":"relationships_state_history","parameters":[{"name":"id","in":"path","required":true,"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":{"$ref":"#/components/schemas/PublicRelationship"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rekap.com/api/api-reference/relationships.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
