> For the complete documentation index, see [llms.txt](https://docs.dispach.moeenmahmud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dispach.moeenmahmud.com/reference/http/dispach-agent-server/move-a-session-into-a-declared-phase.md).

# Move a session into a declared phase.

```json
{"openapi":"3.1.0","info":{"title":"Dispach agent server","version":"0.1.3"},"servers":[{"url":"http://localhost:7420","description":"Local server. Replace this with the URL of your deployment."}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An operator key or the configured token."}}},"paths":{"/v1/agents/{id}/sessions/{key}/phase":{"post":{"summary":"Move a session into a declared phase.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"No credential, or one this server does not accept."},"404":{"description":"No such agent, or it is switched off."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"phase":{"type":"string","minLength":1,"code":"phase_invalid","hint":"Send the name of a phase this agent's manifest declares. `GET /v1/agents/:id` lists them.","description":"The phase to move this session into."}},"required":["phase"]}}}}}}}}
```
