/linkscreate links
#create-short-urlsCreates a DyLy short link belonging to the authenticated project.
Supported link types
url: Redirects the visitor todestinationUrl.json: Returns the JSON payload stored inrawJson.jwt: Returns a signed JWT built fromjwtClaims. WhendestinationUrlis supplied the JWT is delivered via the redirect target; otherwise it is returned inline. Implicit flow appends the token to the fragment, while code flow issues a one-time authorization code.deep: Issues a deep link with a signed token query string for downstream validation. If the app is not installed the user is redirected todestinationUrl.
Validation and defaults
projectIdmust belong to the caller. Authorization failures return401or403.domainis normalized to lowercase and must be registered for the project. When omitted the project's default domain is used.- TTL (
expiresIn) defaults to unlimited access when capabilities allow. If the project cannot control TTL, the service forces a 24 hour TTL. A positive TTL must be at least 60 seconds. - For
jwtlinksjwtClaimsare required. Providing adestinationUrlalso requiresflow; settingflow: codeadditionally requiresclientType. A secure code verifier is generated automatically for code flow. - For
jsonlinksrawJsonmust contain a valid payload within platform limits (depth ≤ 4, arrays ≤ 10 items, string length ≤ 192 characters). - For
urlanddeeplinksdestinationUrlmust be an absolute http(s) URL. oneTimeandkeyProtectedrequire the corresponding project capability. If the project lacks the capability the value is coerced tofalse. WhenkeyProtectedis enabled the returnedshortUrlcontains akeyquery string parameter.- Custom
pathvalues must match the documented pattern. When omitted a unique path is generated.
Response
- Returns the persisted link metadata including the generated alias and, for JWT code flow, the server-issued
codeVerifier.
Rate limiting & quotas
- Project rate limits and link quotas are evaluated for every request. Exceeding the limits results in
429or403responses depending on the violation.
Parameters
AuthorizationheaderrequiredHTTP Basic authentication using the DyLy client credentials. Format: Authorization: Basic base64(clientId:clientSecret) for a client that can access the target project.
string
Request body
Required · application/json
object
projectIdrequiredstring / uuidGUID of the project that owns the link. Must match the authenticated project context and must be a valid UUID v4 format.
typerequiredstringLink type to create. Supported values:
url,json,jwt, ordeep. Each type drives validation and how the link behaves when accessed.domainstringDomain that will host the link (e.g.,
myproject.dyly.dev). Must be lowercase and registered to the project. If omitted, the project's default domain is used.destinationUrlstringAbsolute HTTP(S) URL to redirect to. Required for
urlanddeeplinks, optional forjwtlinks. When provided forjwt, you must also setflow.pathstringOptional custom path (1–3 segments of lowercase letters, digits,
-, or.). Each segment can be 1-36 characters. The service generates a unique path when omitted. Reserved paths such as.well-known/jwks.json,state-validation, anddeferred-paramsare rejected.rawJsonobjectJSON payload returned when the link is accessed. Required for
jsonlinks. Payloads must satisfy platform limits (nesting depth ≤ 4, arrays ≤ 10 items, string length ≤ 192 characters).jwtClaimsobjectClaims to include in JWT responses. Required for
jwtlinks and optional fordeeplinks. Reserved top-level claims (iss,iat,exp,nbf,jti,path,queryString,fragment) are populated by the service and must not be supplied.jwtExpiresInnumberLifetime of the issued JWT in seconds. Accepts values between 300 (5 minutes) and 86,400 (24 hours). Defaults to 900 (15 minutes).
expiresInnumberLifetime of the link in seconds.
0(default) keeps the link active indefinitely when allowed. Positive values below 60 are rejected. If the project cannot manage TTL, the service coerces the value to 86,400 seconds (24 hours). Maximum is 31,536,000 seconds (1 year).oneTimebooleanWhen
true, the link can be used only once. Requires the one-time-link capability (Standard Plan); otherwise the value is forced tofalse.keyProtectedbooleanWhen
true, the link requires an opaquekeyquery parameter for access. Requires the protected-link capability (Standard Plan); otherwise the value is forced tofalse. If enabled, the response includes the generated key inshortUrl.flowstringJWT retrieval flow when
typeisjwtanddestinationUrlis specified. Useimplicitto append the token to the URL fragment, orcodeto issue a one-time authorization code with PKCE support.clientTypestringRequired when
flowiscode. Indicates whether the link was created for apublicorconfidentialclient, which controls PKCE requirements. Public clients must provide a code verifier, while confidential clients use a client secret.
Responses
200application/jsonLink created successfully. Returns the complete link metadata including the generated short URL and alias.
object
projectIdstring / uuidProject UUID (v4) that owns the link.
destinationUrlstringRedirect target URL returned when the link is accessed. Present for
url,deep, and redirect-stylejwtlinks. Null forjsonand inlinejwtlinks.pathstringRelative path assigned to the link (without domain). Auto-generated as a unique identifier unless a custom path was supplied during creation.
rawJsonobjectJSON payload returned to callers for
jsonlinks. Omitted for other link types. The payload adheres to platform limits (nesting depth ≤ 4, arrays ≤ 10 items, string length ≤ 192 characters, key length ≤ 32 characters).jwtClaimsobjectClaims stored for JWT-based links (
jwtordeeptype). Reserved top-level claims (iss,iat,exp,nbf,jti,path,queryString,fragment) are populated automatically by the platform and not included here.shortUrlstringFully-qualified URL that end users visit to access the link. Includes the generated
keyquery parameter whenkeyProtectedis true (e.g.,https://myproject.dyly.dev/my-custom-path?key=abc123).aliasstringThe unique identifier for the link (base64-encoded). Use this value with lookup, update, and deletion APIs. Length: 1-1024 characters.
expiresInnumberRemaining lifetime in seconds before the link expires and becomes inaccessible.
nullor0indicates the link does not expire automatically.jwtExpiresInnumberLifetime in seconds for JWT tokens produced by the link (between 300 and 86,400 seconds). Only populated for
jwtanddeeplinks.createdAtstring / date-timeISO 8601 timestamp indicating when the link was created.
oneTimebooleanIndicates whether the link can be consumed only once. After the first access, the link becomes invalid.
typestringLink type stored for the resource. Possible values:
url(simple redirect),json(returns JSON payload),jwt(issues signed token), ordeep(app deep link with token).keyProtectedbooleanTrue when the link requires a
keyquery parameter for access. The key value is included inshortUrlwhen this is enabled.flowstringJWT retrieval flow when the link was created with a redirect (
implicitappends token to fragment,codeissues authorization code). Only present forjwtlinks withdestinationUrl.domainstringFully qualified domain name hosting the link.
codeVerifierstringPKCE code verifier generated for JWT code flow links. Returned during creation so public clients can exchange the authorization code. Only present for
jwtlinks withflow: code.clientTypestringClient classification associated with the link (
publicorconfidential). Present for JWT code flow links and determines the authentication requirements.
400application/jsonInvalid request. Validation failed for one or more parameters, or business rules were violated (e.g., missing required fields for link type, invalid URL format, reserved path used).
object
errorCoderequiredstringA stable, machine-readable error code that identifies the specific type of error. Use this for programmatic error handling.
errorMessagerequiredstringA human-readable message that describes the error. This message may contain additional context about what went wrong and how to fix it.
correlationIdrequiredstring / uuidA unique identifier (UUID) for this request that can be used to trace the error in server logs. Include this ID when contacting support. This value matches the X-Correlation-Id response header.
401application/jsonUnauthorized. The Authorization header is missing, malformed, or contains invalid credentials.
object
errorCoderequiredstringA stable, machine-readable error code that identifies the specific type of error. Use this for programmatic error handling.
errorMessagerequiredstringA human-readable message that describes the error. This message may contain additional context about what went wrong and how to fix it.
correlationIdrequiredstring / uuidA unique identifier (UUID) for this request that can be used to trace the error in server logs. Include this ID when contacting support. This value matches the X-Correlation-Id response header.
403application/jsonForbidden. The authenticated client does not have permission to create links for the specified project, or quota/rate limits have been exceeded.
object
errorCoderequiredstringA stable, machine-readable error code that identifies the specific type of error. Use this for programmatic error handling.
errorMessagerequiredstringA human-readable message that describes the error. This message may contain additional context about what went wrong and how to fix it.
correlationIdrequiredstring / uuidA unique identifier (UUID) for this request that can be used to trace the error in server logs. Include this ID when contacting support. This value matches the X-Correlation-Id response header.
404application/jsonNot found. The specified project or domain does not exist.
object
errorCoderequiredstringA stable, machine-readable error code that identifies the specific type of error. Use this for programmatic error handling.
errorMessagerequiredstringA human-readable message that describes the error. This message may contain additional context about what went wrong and how to fix it.
correlationIdrequiredstring / uuidA unique identifier (UUID) for this request that can be used to trace the error in server logs. Include this ID when contacting support. This value matches the X-Correlation-Id response header.
429application/jsonToo many requests. Rate limit exceeded for the current user or project.
object
errorCoderequiredstringA stable, machine-readable error code that identifies the specific type of error. Use this for programmatic error handling.
errorMessagerequiredstringA human-readable message that describes the error. This message may contain additional context about what went wrong and how to fix it.
correlationIdrequiredstring / uuidA unique identifier (UUID) for this request that can be used to trace the error in server logs. Include this ID when contacting support. This value matches the X-Correlation-Id response header.
500application/jsonInternal server error. An unexpected error occurred while processing the request.
object
errorCoderequiredstringA stable, machine-readable error code that identifies the specific type of error. Use this for programmatic error handling.
errorMessagerequiredstringA human-readable message that describes the error. This message may contain additional context about what went wrong and how to fix it.
correlationIdrequiredstring / uuidA unique identifier (UUID) for this request that can be used to trace the error in server logs. Include this ID when contacting support. This value matches the X-Correlation-Id response header.