Skip to content
API console (try a request with your own key)Get early access

Create a read-only view link for a sheet

POST
/v1/extractions/{jobId}/sheets/{sheetNumber}/view-links
#!/usr/bin/env bash
set -euo pipefail
API=https://api.speccapture.com
AUTH="Authorization: Bearer $SPECCAPTURE_API_KEY"
JOB_ID=7c9e6679-7425-40de-944b-e07fc1f90ae7 # the jobId the submission answered with
SHEET_NUMBER=1 # which sheet: 1 is the first page
link=$(curl -sS --fail-with-body "$API/v1/extractions/$JOB_ID/sheets/$SHEET_NUMBER/view-links" \
-H "$AUTH" \
-H "Content-Type: application/json" \
-d '{"expiresInDays":30}') || { echo "$link" >&2; exit 1; }
jq -r '"Anyone with this link sees the sheet until \(.expiresAt): \(.viewUrl)"' <<<"$link"
jq -r '"To withdraw it: \(.viewLinkId)"' <<<"$link"

Answers 201 with viewUrl: the sheet’s drawing with every value’s box and confidence, for anyone holding the link, with no sign-in, until expiresAt or until it is withdrawn. Shown once; results never carry it. Body (optional): { “expiresInDays”: 1-90 }, 30 by default, capped by the workspace’s retention. Add ?field= to the viewUrl to open it focused on one value. A sheet that is not read yet, whose drawing is no longer kept, or that is marked export-controlled (markedControlled) while its workspace has not kept it (controlledKept) answers 409 not_shareable, its detail saying which.

jobId
required
string format: uuid
sheetNumber
required
integer format: int32
/^-?(?:0|[1-9]\d*)$/
Media typeapplication/json
One of:
null

Created

Media typeapplication/json
object
viewLinkId
required
string format: uuid
jobId
required
string format: uuid
sheetNumber
required
integer format: int32
viewUrl
required
string
createdAt
required
string format: date-time
expiresAt
required
string format: date-time

Bad Request: a problem with a stable code. See Errors for every code and what to do about it.

Media typeapplication/problem+json

Every error: a problem with a stable code. https://speccapture.com/docs/api/errors lists every code.

object
type

A link to the code’s entry in the docs.

null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
code

What went wrong, as a stable code to branch on: a published code never changes meaning.

string
traceId

This request’s trace: quote it when asking for help.

string

Forbidden: a problem with a stable code. See Errors for every code and what to do about it.

Media typeapplication/problem+json

Every error: a problem with a stable code. https://speccapture.com/docs/api/errors lists every code.

object
type

A link to the code’s entry in the docs.

null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
code

What went wrong, as a stable code to branch on: a published code never changes meaning.

string
traceId

This request’s trace: quote it when asking for help.

string

Not Found: a problem with a stable code. See Errors for every code and what to do about it.

Media typeapplication/problem+json

Every error: a problem with a stable code. https://speccapture.com/docs/api/errors lists every code.

object
type

A link to the code’s entry in the docs.

null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
code

What went wrong, as a stable code to branch on: a published code never changes meaning.

string
traceId

This request’s trace: quote it when asking for help.

string

Conflict: a problem with a stable code. See Errors for every code and what to do about it.

Media typeapplication/problem+json

Every error: a problem with a stable code. https://speccapture.com/docs/api/errors lists every code.

object
type

A link to the code’s entry in the docs.

null | string
title
null | string
status
null | integer format: int32
detail
null | string
instance
null | string
code

What went wrong, as a stable code to branch on: a published code never changes meaning.

string
traceId

This request’s trace: quote it when asking for help.

string