# `Ankusa.SDK.Sources.Spec`
[🔗](https://github.com/jamescarr/ankusa/blob/sdk-elixir-v0.6.0/packages/sdk-elixir/lib/ankusa/sdk/sources/spec.ex#L1)

The writable fields of a source, as submitted to `PUT`/`POST`.

`sinks` is required and must be non-empty — the server validates the spec
exactly as it validates the YAML config. `verify` is optional; absent means
the server's default (`{"type": "none"}`), because omitting it is not the same
as re-sending a secret the API never returns.

```elixir
%Ankusa.SDK.Sources.Spec{
  sinks: [%{"type" => "log"}],
  verify: %{"type" => "hmac", "secret" => "s3cr3t", "signature_header" => "X-Sig"},
  on_verify_failure: "reject"
}
```

# `t`

```elixir
@type t() :: %Ankusa.SDK.Sources.Spec{
  on_verify_failure: String.t() | nil,
  sinks: [map()] | nil,
  verify: map() | nil
}
```

# `to_json`

```elixir
@spec to_json(t()) :: map()
```

The JSON body for a create/update, omitting unset (`nil`) fields.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
