# Refresh an actor session

Source: https://docs.wabe.sh/api-reference/operations/refreshactorsession/

`POST https://api.wabe.sh/v1/runtime/sessions/{session}/refresh`

## Authorization

Refresh token from the actor runtime session.

## Parameters

- `session` (path, string, required) — Session ID from the actor runtime.

- `Idempotency-Key` (header, string, required) — Reuse the key when retrying the same refresh.

## Responses

### 200

Rotated runtime credentials.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "sessionId": {
      "type": "string",
      "format": "uuid",
      "example": "779742ad-cd09-4e1c-9170-f20968b344d4"
    },
    "accessToken": {
      "type": "string",
      "example": "YOUR_RUNTIME_TOKEN"
    },
    "accessExpiresAt": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp in seconds."
    },
    "refreshToken": {
      "type": "string",
      "example": "YOUR_RUNTIME_TOKEN"
    },
    "refreshUrl": {
      "type": "string",
      "format": "uri",
      "example": "https://api.wabe.sh/v1/runtime/sessions/779742ad-cd09-4e1c-9170-f20968b344d4/refresh"
    },
    "sessionExpiresAt": {
      "type": "integer",
      "format": "int64",
      "description": "Unix timestamp in seconds."
    }
  },
  "required": [
    "sessionId",
    "accessToken",
    "accessExpiresAt",
    "refreshToken",
    "refreshUrl",
    "sessionExpiresAt"
  ]
}
```

### 400

Invalid or missing Idempotency-Key.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 401

Invalid or expired refresh token.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 403

Instance generation or disk grant changed.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 409

Session or refresh conflict.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 429

Refresh rate limit exceeded.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 503

Actor API temporarily unavailable.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```
