---
search:
  tags:
    - Services
    - PATCH
seo:
  description: >-
    Update a service; ports and checker timeout freeze with the… Reference for
    the PATCH /api/admin/services/{id} endpoint in the Athena Attack/Defence
    Admin API.
sidebar:
  label: Update a service; ports and checker timeout freeze with the host allocation
  badge: PATCH
title: Update a service; ports and checker timeout freeze with the host allocation
type: openapi-operation
---
`PATCH /api/admin/services/{id}`

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

- `name` (string)
- `description` (string)
- `ports` (object[])
- `checkerTimeoutSeconds` (integer | null)
- `position` (integer)
- `expectedUpdatedAt` (string<date-time>)

Request body example:

```json
{
  "name": "string",
  "description": "string",
  "ports": [
    {
      "port": 1,
      "protocol": "tcp"
    }
  ],
  "checkerTimeoutSeconds": 5,
  "position": 0,
  "expectedUpdatedAt": "2019-08-24T14:15:22Z"
}
```

**Responses**

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

Response example, 200:

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