---
search:
  tags:
    - Services
    - POST
seo:
  description: >-
    Attach an uploaded source archive to a service. Reference for the POST
    /api/admin/services/{id}/source endpoint in the Athena Attack/Defence Admin
    API.
sidebar:
  label: Attach an uploaded source archive to a service
  badge: POST
title: Attach an uploaded source archive to a service
type: openapi-operation
---
`POST /api/admin/services/{id}/source`

**Request body** (`application/json`, required)

- `fileId` (string, required)

Request body example:

```json
{
  "fileId": "string"
}
```

**Responses**

- `200` — Success
- `400` — Response for status 400
- `401` — Unauthorized
- `404` — Response for status 404
- `409` — Response for status 409
- `413` — Response for status 413
- `422` — Validation failed
- `500` — Unhandled server error

Response example, 200:

```json
{
  "number": 0,
  "checkerTimeoutSeconds": 0,
  "id": "string",
  "name": "string",
  "description": "string",
  "slug": "string",
  "image": "string",
  "imageDigest": "string",
  "checkerImage": "string",
  "checkerImageDigest": "string",
  "ports": [
    {
      "port": 0,
      "protocol": "tcp"
    }
  ],
  "position": 0,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "enabled": true,
  "createdBy": "string",
  "pullUsername": "string",
  "sourceFileId": "string",
  "pullCredentialsSet": true
}
```
