# acceptShareInvitation

Source: /openapi/thomas-federated.openapi.json

## Operation

| Method | URL |
|---|---|
| POST | https://api.thomas.co/v1/share-invitations/{id}/accept |

| Field | Value |
|---|---|
| operationId | acceptShareInvitation |
| method | POST |
| server | https://api.thomas.co/v1 |
| path | /share-invitations/{id}/accept |
| tags | `Sharing` |
| summary | Accept a reciprocal share invitation |
| badges | None |

## Request Parameters

| Name | In | Required | Schema | Description |
|---|---|---|---|---|
| id | path | true | string |  |

## Request Body

None.

## Responses

| Status | Description | Schema refs |
|---|---|---|
| 200 | The accepted invitation | #/components/schemas/ShareInvitationResponseDto |
| 400 | Malformed invitation id path parameter | #/components/schemas/ApiErrorResponseDto |
| 401 | Invalid or missing authentication token (AUTH_TOKEN_INVALID) | #/components/schemas/ApiErrorResponseDto |
| 404 | Invitation not found or not addressed to the caller | #/components/schemas/ApiErrorResponseDto |
| 409 | The invitation has already been accepted or dismissed | #/components/schemas/ApiErrorResponseDto |

## Artifact Examples

### Response 400 example

```json
{
  "statusCode": 400,
  "message": "Validation failed (uuid is expected)",
  "error": "HTTP_BAD_REQUEST"
}
```

### Response 401 example

```json
{
  "statusCode": 401,
  "message": "Invalid or missing authentication token",
  "error": "AUTH_TOKEN_INVALID"
}
```

### Response 404 example

```json
{
  "statusCode": 404,
  "message": "Share invitation not found",
  "error": "SHARE_INVITATION_NOT_FOUND"
}
```

### Response 409 example

```json
{
  "statusCode": 409,
  "message": "Share invitation is not pending",
  "error": "SHARE_INVITATION_NOT_PENDING"
}
```
