---
updatedAt: 2026-04-23T05:40:30.000Z
---

# Generates a field survey URL

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "API V1",
    "version": "v1"
  },
  "paths": {
    "/field_survey_urls": {
      "post": {
        "summary": "Generates a field survey URL",
        "tags": [
          "Field Survey URLs"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "field survey URL generated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "Complete URL with access token. Token expires in 24 hours."
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "ISO 8601 timestamp when the access token expires"
                    }
                  },
                  "example": {
                    "url": "https://example.com/field-survey/volunteer-survey?access_token=abc123&user_id=456",
                    "expires_at": "2025-11-14T10:30:00Z"
                  }
                }
              }
            }
          },
          "404": {
            "description": "user, agent, or page not found"
          },
          "422": {
            "description": "missing required parameters"
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_id": {
                    "type": "integer",
                    "description": "The ID of the user to generate URL for"
                  },
                  "agent_user_id": {
                    "type": "integer",
                    "description": "The ID of the agent user"
                  },
                  "page_id": {
                    "type": "integer",
                    "description": "The ID of the action page (field survey)"
                  }
                },
                "required": [
                  "user_id",
                  "agent_user_id",
                  "page_id"
                ],
                "example": {
                  "user_id": 123,
                  "agent_user_id": 456,
                  "page_id": 789
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.solidarity.tech/v1",
      "variables": {
        "defaultHost": {
          "default": "api.solidarity.tech/v1"
        }
      }
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
```