> For the complete documentation index, see [llms.txt](https://docs.apexsolutions.lol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apexsolutions.lol/api-reference/forter.md).

# Forter

Build a Forter session and submit the encrypted payloads.

The Forter solver returns the encrypted payloads, the ping targets, and the token material Apex builds for your real Chrome-on-Windows User-Agent. All request payloads are sent as `application/json` and authenticated with your API key via `Authorization: Bearer`.

## Build a session

> Builds a Forter session for the target page. Apex solves the\
> proof-of-work through your proxy and returns the encrypted payloads,\
> the ping targets, and the token material.<br>

```json
{"openapi":"3.0.3","info":{"title":"Forter","version":"1.0.0"},"tags":[{"name":"Forter","description":"The Forter solver returns the encrypted payloads, the ping targets, and\nthe token material Apex builds for your real Chrome-on-Windows\nUser-Agent. All request payloads are sent as `application/json` and\nauthenticated with your API key via `Authorization: Bearer`.\n"}],"servers":[{"url":"https://forter.apexsolutions.lol"}],"paths":{"/payload":{"post":{"tags":["Forter"],"summary":"Build a session","description":"Builds a Forter session for the target page. Apex solves the\nproof-of-work through your proxy and returns the encrypted payloads,\nthe ping targets, and the token material.\n","parameters":[{"name":"Content-Type","in":"header","required":true,"description":"The Content-Type of the request body.","schema":{"type":"string","enum":["application/json"]}},{"name":"Authorization","in":"header","required":true,"description":"Your API key for authentication.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadRequest"}}}},"responses":{"200":{"description":"Session generated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayloadResponse"}}}},"400":{"description":"Missing or invalid user_agent, or malformed body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Account balance is 0."},"429":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Proxy connection failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"PayloadRequest":{"type":"object","required":["site_id","seed","page_url","referrer","proxy","user_agent"],"properties":{"site_id":{"type":"string","description":"Forter site ID of the target (from the page snippet)."},"seed":{"type":"string","description":"Seed value for the session (from the page snippet)."},"page_url":{"type":"string","description":"Full URL of the protected page you are solving."},"referrer":{"type":"string","description":"The page that linked to it."},"proxy":{"type":"string","description":"Sticky proxy whose IP matches your final request (Core Requirements)."},"user_agent":{"type":"string","description":"Your real Google Chrome on Windows User-Agent (Core Requirements)."}}},"PayloadResponse":{"type":"object","properties":{"solve_id":{"type":"string","description":"Identifier of the solve that produced the session."},"status":{"type":"string","description":"Always `succeeded` on a 200."},"session_id":{"type":"string","description":"Session identifier, used for `POST /flush`. Valid about 3 minutes and for 5 flushes."},"user_id":{"type":"string","description":"Forter user id for the session."},"cookie":{"type":"string","description":"Forter token value. Attach as the `forterToken` cookie."},"f_sdk_c":{"type":"string","description":"Forter token value. Attach as the `f-sdk-c` header."},"flush":{"type":"object","description":"The first encrypted payload: `url`, `content_type`, `payload_hex`.","properties":{"url":{"type":"string"},"content_type":{"type":"string"},"payload_hex":{"type":"string"}}},"wpt":{"type":"object","description":"The weighted ping target: `url` and JSON `body`.","properties":{"url":{"type":"string"},"body":{"type":"object"}}},"prop_urls":{"type":"array","description":"URLs to GET (property pings).","items":{"type":"string"}},"user_agent":{"type":"string","description":"The User-Agent the session was built for."}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string","description":"Human-readable error message."}}}}}}}}
```

## Flush

> Returns the next encrypted payload for an existing session. The first\
> call returns Flush 2; later calls return any additional flushes the\
> session needs. Alternative endpoint:\
> \`POST <https://forter.apexsolutions.lol/flush/{session\\_id}\\`>.<br>

```json
{"openapi":"3.0.3","info":{"title":"Forter","version":"1.0.0"},"tags":[{"name":"Forter","description":"The Forter solver returns the encrypted payloads, the ping targets, and\nthe token material Apex builds for your real Chrome-on-Windows\nUser-Agent. All request payloads are sent as `application/json` and\nauthenticated with your API key via `Authorization: Bearer`.\n"}],"servers":[{"url":"https://forter.apexsolutions.lol"}],"paths":{"/flush":{"post":{"tags":["Forter"],"summary":"Flush","description":"Returns the next encrypted payload for an existing session. The first\ncall returns Flush 2; later calls return any additional flushes the\nsession needs. Alternative endpoint:\n`POST https://forter.apexsolutions.lol/flush/{session_id}`.\n","parameters":[{"name":"Content-Type","in":"header","required":true,"description":"The Content-Type of the request body.","schema":{"type":"string","enum":["application/json"]}},{"name":"Authorization","in":"header","required":true,"description":"Your API key for authentication.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlushRequest"}}}},"responses":{"200":{"description":"Payload generated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlushResponse"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Session not found or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"FlushRequest":{"type":"object","required":["session_id"],"properties":{"session_id":{"type":"string","description":"The session id returned by `POST /payload`."}}},"FlushResponse":{"type":"object","properties":{"flush_number":{"type":"integer","description":"Which flush this is for the session."},"flush":{"type":"object","description":"The next encrypted payload: `url`, `content_type`, `payload_hex`.","properties":{"url":{"type":"string"},"content_type":{"type":"string"},"payload_hex":{"type":"string"}}}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Machine-readable error code."},"message":{"type":"string","description":"Human-readable error message."}}}}}}}}
```
