> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wfa.team/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an assessment

> Submit trip or hiring details and receive an assessment identifier.

`POST /rwa_create`

Legal entity is derived from your company settings. Use the exact [input options](/reference/input-options) and [country names](/reference/countries).

## Authorization

<ParamField header="Authorization" type="string" required>
  Company Bearer token. Keep it on your server.
</ParamField>

## Body parameters

<ParamField body="purpose" type="string" required>
  Required. `Work From Anywhere` or `Hire From Anywhere`.
</ParamField>

<ParamField body="seniority" type="string" required>
  Required. `Low`, `Mid` or `Senior`.
</ParamField>

<ParamField body="roleType" type="string" required>
  Required. See [role types](/reference/input-options#role-type).
</ParamField>

<ParamField body="citizenship" type="string" required>
  Required. Exact name from the [citizenship list](/reference/countries).
</ParamField>

<ParamField body="destination" type="string" required>
  Required. Exact name marked as supported for destination/residency in the [country reference](/reference/countries).
</ParamField>

<ParamField body="residency" type="string" required>
  Required. Employee employment/residency country; see the [country reference](/reference/countries).
</ParamField>

<ParamField body="salesContracts" type="string" required>
  Required. `Yes` or `No`.
</ParamField>

<ParamField body="pastTripsDuration" type="integer">
  Send a number, including `0` when there are no prior trips. See [prior trip duration](/reference/input-options#prior-trip-duration).
</ParamField>

<ParamField body="legalRight" type="string" required>
  Required. `Yes`, `No` or `Unsure`.
</ParamField>

<ParamField body="benefitLocalMarket" type="string" required>
  Required. `Yes` or `No`.
</ParamField>

<ParamField body="urgency" type="string">
  Required for Hire From Anywhere. See [urgency values](/reference/input-options#hiring-urgency).
</ParamField>

<ParamField body="numberHires" type="integer">
  Required for Hire From Anywhere. Anticipated hires over the next two years.
</ParamField>

<ParamField body="startDate" type="string" required>
  Start date in ISO 8601 format.
</ParamField>

<ParamField body="endDate" type="string" required>
  End date in ISO 8601 format; must be on or after the start.
</ParamField>

<ParamField body="workingDays" type="integer">
  Working days within the trip dates.
</ParamField>

<ParamField body="employeeId" type="string" required>
  Your external employee Staff ID.
</ParamField>

<ParamField body="complianceTeamMemberId" type="string">
  Optional at creation. Your external compliance Staff ID. It is checked for an activated company account when supplied to the update endpoint.
</ParamField>

<ParamField body="managerId" type="string">
  External manager Staff ID.
</ParamField>

## Error responses

Invalid company authorization returns `message: "Invalid Auth"`. Field validation returns `errors[]` with a `field` and `message`; the workflow checks fields in order and stops at the first failing check.

| Field | When returned | Message or correction |
| - | - | - |
| `employeeId` | Missing employee Staff ID | Employee ID is missing |
| `purpose` | Unsupported purpose | Use a value from [input options](/reference/input-options). |
| `seniority` | Unsupported seniority | Use Low, Mid or Senior. |
| `roleType` | Unsupported role type | Use a value from [input options](/reference/input-options). |
| `citizenship` | Unrecognised country | Incorrect Country please review documentation |
| `destination` | Unrecognised destination | Incorrect Country please review documentation |
| `residency` | Unrecognised residency | Incorrect Country please review documentation |
| `salesContracts` | Unsupported selection | Use Yes or No. |
| `pastTripsDuration` | Missing for Work From Anywhere | Past Trip Duration is missing |
| `legalRight` | Unsupported selection | Use Yes, No or Unsure. |
| `benefitLocalMarket` | Unsupported selection | Use Yes or No. |
| `numberHires` | Missing for Hire From Anywhere | Number Hires is missing |
| `urgency` | Unsupported or missing for Hire From Anywhere | Use a value from [input options](/reference/input-options). |

Choice-validation messages are built from Bubble option lists; the correction column gives accepted values rather than a fixed message. Compliance ID and working-days missing-input checks are disabled in the reviewed test workflow.

## Response

<ResponseField name="response.assessment_id" type="string">
  Save this identifier for retrieve and update calls.
</ResponseField>

<ResponseField name="response.redirect_url" type="string">
  URL of the WFA report.
</ResponseField>

<Note>
  Check the JSON response as well as HTTP status. HTTP 200 can contain an API error. If a request times out, check the assessment before retrying. Retry deduplication is not verified.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    'https://wfa-team-tool-v1.bubbleapps.io/version-test/api/1.1/wf/rwa_create' \
    --header "Authorization: Bearer $WFA_COMPANY_TOKEN" \
    --header 'Content-Type: application/json' \
    --data '{
    "purpose": "Work From Anywhere",
    "seniority": "Low",
    "roleType": "Other",
    "citizenship": "Australia",
    "destination": "Argentina",
    "residency": "Australia",
    "salesContracts": "Yes",
    "pastTripsDuration": 0,
    "legalRight": "No",
    "benefitLocalMarket": "No",
    "urgency": "1-3 months",
    "numberHires": 5,
    "startDate": "2026-11-01T00:00:00.000Z",
    "endDate": "2026-11-10T00:00:00.000Z",
    "workingDays": 5,
    "employeeId": "STAFF-001"
  }'
  ```

  ```javascript JavaScript theme={null}
  // Run on your server. Set WFA_COMPANY_TOKEN in its environment.
  const response = await fetch('https://wfa-team-tool-v1.bubbleapps.io/version-test/api/1.1/wf/rwa_create', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.WFA_COMPANY_TOKEN}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      "purpose": "Work From Anywhere",
      "seniority": "Low",
      "roleType": "Other",
      "citizenship": "Australia",
      "destination": "Argentina",
      "residency": "Australia",
      "salesContracts": "Yes",
      "pastTripsDuration": 0,
      "legalRight": "No",
      "benefitLocalMarket": "No",
      "urgency": "1-3 months",
      "numberHires": 5,
      "startDate": "2026-11-01T00:00:00.000Z",
      "endDate": "2026-11-10T00:00:00.000Z",
      "workingDays": 5,
      "employeeId": "STAFF-001"
    })
  });
  const result = await response.json();
  // Check the JSON body as well as the HTTP status.
  console.log(result);
  ```

  ```python Python theme={null}
  # Run on your server. Set WFA_COMPANY_TOKEN in its environment.
  import os
  import requests

  response = requests.post(
      'https://wfa-team-tool-v1.bubbleapps.io/version-test/api/1.1/wf/rwa_create',
      headers={
          'Authorization': f"Bearer {os.environ['WFA_COMPANY_TOKEN']}",
          'Content-Type': 'application/json',
      },
      json={
        "purpose": "Work From Anywhere",
        "seniority": "Low",
        "roleType": "Other",
        "citizenship": "Australia",
        "destination": "Argentina",
        "residency": "Australia",
        "salesContracts": "Yes",
        "pastTripsDuration": 0,
        "legalRight": "No",
        "benefitLocalMarket": "No",
        "urgency": "1-3 months",
        "numberHires": 5,
        "startDate": "2026-11-01T00:00:00.000Z",
        "endDate": "2026-11-10T00:00:00.000Z",
        "workingDays": 5,
        "employeeId": "STAFF-001"
      },
      timeout=45,
  )
  # Check the JSON body as well as the HTTP status.
  print(response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "status": "success",
    "response": {
      "redirect_url": "https://www.app.wfa.team/redirect/YOUR_ASSESSMENT_ID",
      "assessment_id": "YOUR_ASSESSMENT_ID"
    }
  }
  ```

  ```json Invalid auth theme={null}
  {
    "status": "error",
    "success": false,
    "message": "Invalid Auth"
  }
  ```

  ```json Missing employee theme={null}
  {
    "status": "error",
    "success": false,
    "errors": [
      {
        "field": "employeeId",
        "message": "Employee ID is missing"
      }
    ]
  }
  ```

  ```json Invalid country theme={null}
  {
    "status": "error",
    "success": false,
    "errors": [
      {
        "field": "destination",
        "message": "Incorrect Country please review documentation"
      }
    ]
  }
  ```

  ```json Missing prior days theme={null}
  {
    "status": "error",
    "success": false,
    "errors": [
      {
        "field": "pastTripsDuration",
        "message": "Past Trip Duration is missing"
      }
    ]
  }
  ```

  ```json Missing hires theme={null}
  {
    "status": "error",
    "success": false,
    "errors": [
      {
        "field": "numberHires",
        "message": "Number Hires is missing"
      }
    ]
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.