---
title: "Replace the remote task auth secret"
method: PUT
path: "/api/{org_id}/tasks/{entity_id}/auth"
tags: ["RemoteTasks"]
---

# Replace the remote task auth secret

`PUT /api/{org_id}/tasks/{entity_id}/auth`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/tasks/{entity_id}/auth`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/tasks/:entity_id/auth/put.ts> (a function with typed inputs; its response is checked against the schema)

Re-encrypts the replacement for the configured auth method. Remote task versions are unchanged.

## Path parameters

- `org_id` string, required
- `entity_id` string, required

## Request body

- object
  - `material` union, required
    - object
      - `type` 'token', required
      - `value` string, required
    - object
      - `password` string, required
      - `type` 'basic', required
      - `username` string, required

## Response `200`

- object
  - `createdAt` integer, required
  - `graceExpiresAt` integer, nullable
  - `keyId` string, nullable
  - `lastVerifiedAt` integer, nullable
  - `purpose` 'auth' | 'signing', required
  - `state` string, required
  - `updatedAt` integer, required

## Other responses

- `400`: Bad Request
- `404`: Not Found

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
